home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / misc / o-z / x-windows / mesa-amiwin / src / notes < prev    next >
Encoding:
Text File  |  1995-04-21  |  24.0 KB  |  746 lines

  1. Last changed:  31 Mar 1995
  2.  
  3. Random notes....
  4.  
  5. In this file we explain how and why certain things are done, and point
  6. out where work remains...
  7.  
  8.  
  9.  
  10. Rasterization
  11. -------------
  12.  
  13. There are two schemes used for rasterization:  pixel spans and pixel arrays.
  14.  
  15. Pixel Spans are horizontal runs of pixels generated by polygon rasterization
  16. and glDrawPixel operations.  As seen in span.c, horizontal runs of pixels are
  17. passed to each enabled raster operation (blending, depth-buffering, stencil,
  18. etc).  At many of these stages, pixels may be discarded due to failing the
  19. depth test, stippling, etc.  The boolean mask array indicates which pixels to
  20. draw and which to discard.
  21.  
  22. Spans are good because many pixels can be processed per function call.  Also,
  23. we're taking advantage of spatial coherence.
  24.  
  25. Pixel arrays are used in the rasterization of points, lines, and bitmaps.
  26. The pixel array (or pixel buffer) scheme is very similar to the pixel span
  27. method.  The only difference is that the pixels can be at random locations.
  28.  
  29. Despite the care I've put into rasterization, it's still the bottleneck in
  30. Mesa.  The OpenGL rasterization pipeline imposes a certain structure which
  31. is difficult to implement at maximum speed.  I'm still working on it though...
  32.  
  33.  
  34. Polygons
  35. --------
  36. The vertices of a polygons (and triangles and quads, etc) are stored in
  37. VB.Eye[], etc.  The vlist[] array is an list of indexes into the vertex
  38. arrays, defining the vertices of the polygon.  This scheme is was prompted
  39. by how clipping is done.  Remember that clipping a polygon may result in an
  40. unchanged polygon or a radically different one.  In the former case, we don't
  41. want to copy vertex data from an input list to a clipped list.  In the later
  42. case, we don't want to shift vertex data to insert new vertices.  The solution
  43. was to use a level of indirection (the vlist array).  This also worked
  44. out well for the TRIANGLE_STRIP, TRIANGLE_FAN, QUAD_STRIP, etc. primitives.
  45.  
  46. The only disadvantage is the extra cycles needed to lookup indexes via
  47. vlist when doing vertex transformations.  Maybe copying and shifting
  48. data in the clippers is OK if you don't mind a big speed hit for clipping.
  49.  
  50. The polygon rasterizing functions in polygons.c will handle any n-sided
  51. simple polygon.  Would it have been better to break down n-sided poly-
  52. gons into triangles and do triangle rasterization only (which we could
  53. optimize?)  Maybe, but interpolation of colors across quadrilaterals
  54. looks better when they're treated as 4-sided polygons instead of 2 tri-
  55. angles.
  56.  
  57.  
  58. Clipping
  59. --------
  60. Clipping points is trivial.
  61.  
  62. Line clipping is done with the usual bit-mask line clipping algorithm.
  63.  
  64. Polygon clipping is based on the edge-by-edge method of Sutherland-Hodgman.
  65.  
  66. Yes, I went crazy with macros!  It was a good way to avoid writing nearly
  67. the same code over and over and is faster than a bunch of function calls.
  68. Be ready for a debugging nightmare if you want to change this code!  This
  69. code is pretty fast as is.
  70.  
  71.  
  72. Transformations
  73. ---------------
  74. The functions in xform.c for rotate, scale, translate all construct 4x4
  75. matrices then do matrix multiplies.  This should be optimized!  However,
  76. always making a 4x4 matrix is simple for display lists.  Also, some of
  77. the functions (gl_transform_point,etc) should be rewritten as macros
  78. and put in xform.h.
  79.  
  80.  
  81. Point, line, polygon rendering
  82. ------------------------------
  83. In points.c, lines.c and polygons.c there are a number of rasterization
  84. functions for each primitive.  The one to use is determined by looking
  85. at the current context.  If you have a special combination of rendering
  86. operations which isn't as fast as it could be, it should be easy to add
  87. it in like the others.
  88.  
  89.  
  90. Dithering
  91. ---------
  92. The spec says dithering should initially be enabled.  Testing this using
  93. SGI's library and demo programs, glIsEnabled says dithering is enabled
  94. yet there is no visual evidence of dithering.  It seems to me that dithering
  95. should initially be off especially for CI visuals.  Suppose you're drawing
  96. a flat-shaded polygon with index 5 which is mapped to red.  You don't
  97. want dithering to produce pixels with value 4 because who knows what
  98. color is loaded at position 4 in the colormap.  Currently, dithering
  99. is initially disabled in this implementation.
  100.  
  101.  
  102. GLU library
  103. -----------
  104. The GLU library is very much incomplete.  Only the most frequently used
  105. functions are done.  Others are half-hearted attempts.  Someone who
  106. knows splines has to write the NURBS code.
  107.  
  108. All the GLU functions should be written in terms of GL calls.  The GLU
  109. library could be written by someone entirely independent of the main
  110. library.
  111.  
  112.  
  113. Tk and aux libraries
  114. --------------------
  115. These libraries are based on SGI code.  They shouldn't be used for real
  116. applications.  Go directly to the X/Mesa interface, use the pseudo-GLX
  117. functions, or use GLUT instead.
  118.  
  119.  
  120. Demo programs
  121. -------------
  122. Look at the source for the demo programs to learn what keyboard functions
  123. are available.  New demos should be written since these are mostly SGI's.
  124.  
  125.  
  126. glDrawPixels, glReadPixels, glBitmap
  127. ------------------------------------
  128. These functions are complicated because of the vast number of options
  129. possible.  I haven't put much effort into speeding them up.  The glPixelZoom
  130. operation isn't supported yet.  I'm not sure of the best way to integrate it.
  131.  
  132.  
  133. C notes
  134. -------
  135. When writing new code, use the strictest compiler flags available.  This
  136. helps to catch subtle bugs and increases portability.  Also, use lint
  137. once in a while.  There shouldn't be any compilation warnings, except
  138. when the compiler is at fault.
  139.  
  140. Look at assembly language output when not sure how to efficiently
  141. write something.
  142.  
  143. Use the right data types.  Use unsigned types instead of signed types
  144. when possible since some compilers can generate better code with them.
  145. Be aware of how type conversions are done.  On SGI systems for example,
  146. float/int conversion is much more efficient than float/unsigned int
  147. conversion.
  148.  
  149. Write straightforward code:  compilers often can do better optimizations
  150. on simple code than complicated code.  It's also easier for others to
  151. understand.
  152.  
  153. USE COMMENTS!
  154.  
  155.  
  156. Compiler problems
  157. -----------------
  158. The DEC ultrix C compiler doesn't recognize the 'const' qualifier!  OSF/1
  159. hasn't been tested.
  160.  
  161. The Sun ANSI C compiler doesn't have correct prototypes for memcpy(), etc
  162. in its header files.  Also, it complains about mixed-type expressions
  163. much more than other compilers.
  164.  
  165. The Amiga DCC compiler, at least the version I have, can't compile Mesa
  166. because it's just too big.  Also it doesn't like the F floating point
  167. constant suffix.
  168.  
  169. SGI's IRIX 4.0.5 C compiler produces *many* warnings when -fullwarn is
  170. specified, unlike IRIX 5.2 C compiler.
  171.  
  172. SGI's IRIX 6.0.1 C compiler produces many detailed warnings, use the -woff
  173. option to control them.
  174.  
  175. There appear to be some fatal bugs in Mesa when compiled on IRIX 6.0 systems.
  176. Try the demos/wave program for example...
  177.  
  178.  
  179. Known Bugs
  180. ----------
  181. Under IRIX 6.0 in 64-bit mode, cones are drawn incorrectly.  Namely, depth
  182. buffering is incorrect for quadrilateral which share a common vertex.  The
  183. problem is either in the computation of the equation of the quad's plane
  184. or in the computation/interpolation of Z values.
  185.  
  186. Under IRIX 6.0 in 64-bit mode, the wave demo doesn't work.  dbx reports the
  187. crash inside an Xlib call...
  188.  
  189. Linux systems are more sensitive to floating point exceptions.  At the time
  190. of writing this, all known FP exceptions have been fixed.
  191.  
  192.  
  193. Summary of the source code in src/
  194. ----------------------------------
  195. Here is a summary of the source files which implement the core library.
  196. See the top of each file for details.
  197.  
  198. accum.[ch]    - accumulation buffer
  199.  
  200. alpha.[ch]    - alpha test
  201.  
  202. amesa.[ch]    - Amiga interface
  203.  
  204. attrib.[ch]    - attribute stack
  205.  
  206. bitmap.[ch]    - glBitmap
  207.  
  208. blend.[ch]    - pixel blending
  209.  
  210. bresenham.[ch]    - implementation of Bresenham's line algorithm
  211.  
  212. clip.[ch]    - functions for clipping points, lines, and polygons
  213.           against the view volume and user-defined clipping planes
  214.           Check out this code!  It makes liberal use of the cpp!
  215.  
  216. config.h    - tunable configuration parameters
  217.  
  218. context.[ch]    - definition of the library context and functions for creating,
  219.           setting, deleting contexts.
  220.  
  221. copypixels.[ch]    - glCopyPixels
  222.  
  223. dd.h        - device driver function prototypes.  These functions must
  224.           must be implemented by xmesa.c, amesa.c, etc. to perform
  225.           low-level rendering.
  226.  
  227. depth.[ch]    - depth buffer functions
  228.  
  229. dither.[ch]    - dithering functions
  230.  
  231. draw.[ch]    - point, line, and polygon rendering
  232.  
  233. drawpixels.[ch]    - glDrawPixels
  234.  
  235. enable.c    - the glEnable and glDisable functions
  236.  
  237. eval.[ch]    - evaluators
  238.  
  239. feedback.[ch]    - feedback and selection facilities
  240.  
  241. fog.c        - fog functions
  242.  
  243. get.c        - glGet* functions
  244.  
  245. glx.c        - pseudo-GLX functions
  246.  
  247. interp.[ch]    - interpolation functions
  248.  
  249. light.[ch]    - lighting, material, and shading functions
  250.  
  251. lines.[ch]    - line segment rendering
  252.  
  253. list.[ch]    - display lists
  254.  
  255. logic.[ch]    - pixel logic ops
  256.  
  257. macros.h    - useful macros used in many files
  258.  
  259. misc.c        - simple, miscellaneous functions
  260.  
  261. pb.c        - pixel buffer (pixel array) functions
  262.  
  263. pixel.[ch]    - glPixelStore, glPixelTransfer, etc.
  264.  
  265. points.[ch]    - point rendering
  266.  
  267. polygons.[ch]    - polygon rendering
  268.  
  269. quickpoly.[ch]    - quick and dirty polygon rendering
  270.  
  271. readpixels.c    - glReadPixels
  272.  
  273. scissor.[ch]    - scissor box
  274.  
  275. span.[ch]    - pixel span processing
  276.  
  277. stencil.[ch]    - stencil operations
  278.  
  279. texture.[ch]    - texture mapping
  280.  
  281. vb.[ch]        - vertex buffer data structure
  282.  
  283. vertex.c    - the glVertex*, glNormal*, glIndex* and glColor* functions
  284.  
  285. xform.[ch]    - matrix transformation functions
  286.  
  287. xmesa.c        - the X/Mesa interface
  288.  
  289.  
  290.  
  291. If you want to familiarize yourself with the source code, the place to
  292. start is in context.h.  This file defines the structures which make up
  293. the global rendering context.
  294.  
  295. There's only 3 global variables in the whole library: CC, PB and VB.  CC
  296. (Current Context) and is a structure which contains the entire current
  297. rendering context.  With the functions in context.c we can setup multiple
  298. contexts and switch between them to support rendering in multiple windows
  299. (almost) simultaneously.  PB is the pixel buffer structure.  VB is the
  300. vertex buffer structure.
  301.  
  302. Why isn't CC a pointer to a context structure?  CC is referenced a *lot*
  303. and we don't want to dereference a pointer every time we access it.  As a
  304. trade-off, I deemed it acceptable to do memcpy's of the structure when
  305. switching current contexts.
  306.  
  307. Probably the second thing to look at is draw.c which implements the
  308. glBegin/glVertex/glEnd stuff.  The VB variable is a structure which holds
  309. arrays of vertices, colors, texture coordinates, etc.  A polygon is defined
  310. by an array of indexes into the VB arrays.  This was needed because clipping
  311. can delete and add vertices to a polygon.  Maintaining a list of indexes is
  312. faster than doing memcpy's to shift vertex data when vertices are added and
  313. deleted.  Also, this system works well for primitives which share vertices
  314. (triangle and quad strips).  Line segment vertices are indexed similarly.
  315.  
  316. Beyond that, the source code is divided up into relatively independent
  317. modules with simple names.  It should be easy to find all the code
  318. related to any particular library feature.
  319.  
  320. On naming conventions:  functions which are defined in one file and used
  321. from other files have the suffix gl_.  Also, such functions are proto-
  322. typed in the corresponding .h file.  Functions which are only called in
  323. the file in which they are defined are declared as static without the
  324. gl_ prefix.  I always like the Modula-2 way of doing things!
  325.  
  326. As long as the application writer doesn't name his/her functions with a
  327. leading gl_ and doesn't use a variable named CC, there should be no
  328. symbol conflicts.  Perhaps CC should be renamed...
  329.  
  330.  
  331.  
  332. Organization
  333. ------------
  334.  
  335.     +-----------------------------------------------------+
  336.     |                                                     |
  337.     |                 Client Programs                     |
  338.     |                                                     |
  339.     +-----------------------------------------------------+
  340.  
  341.     +-----------+  +------------+------------+  +---------+
  342.     |           |  |    aux     |            |  |         |
  343.     |    GLU    |  +------------+    tk      |  |  GLUT   |
  344.     |           |  |                         |  |         |
  345.     +-----------+  +-------------------------+  +---------+
  346.  
  347.     +----------------------------+------------------------+
  348.     |                            |                        |
  349.     |          Mesa              |                        |
  350.     |                            |                        |
  351.     +----------------------------+  xmesa/amesa/glx, etc  |
  352.     |          dd.h              |                        |
  353.     +----------------------------+                        |
  354.     |                                                     |
  355.     |                                                     |
  356.     +-----------------------------------------------------+
  357.     |           Hardware/OS/Window System                 |
  358.     +-----------------------------------------------------+
  359.  
  360. Key:
  361.  
  362. Hardware/OS/Window System - Putting images onto the display screen is done
  363.     by calling whatever graphics rendering functions are made available
  364.     by the system's hardware, operating system or window system.  For
  365.     example:
  366.         Unix/X        Xlib calls
  367.         Amiga        Intuition/graphics library calls
  368.         PC        Windows calls or direct writing to hardware
  369.  
  370. xmesa, amesa, etc - Each computer system will probably require a different
  371.     'interface library' to provide the connection between the core
  372.     library and the underlying hardware/os/window system.  Typically,
  373.     there will, be functions to create rendering contexts, attach them
  374.     to windows or screens, etc.  Also, the functions described in dd.h
  375.     must be implemented as the core library uses these functions to
  376.     produce output.
  377.  
  378. dd.h - device driver function prototypes.  These functions must be imple-
  379.     mented in order to produce output.  Examples are functions to
  380.     set the current color, draw pixels, lines, polygons, write spans
  381.     of pixels, and swap buffers.
  382.  
  383. Mesa - this is the core library.  It should be completely portable as
  384.     all system-dependent features are accessed through the device driver
  385.     functions.
  386.  
  387. GLU - This utility library is completely implemented in terms of GL calls.
  388.  
  389. tk  - A simple window system independent toolkit.
  390.  
  391. aux - A simple library build on tk.
  392.  
  393. Client Programs - Graphics programs will use the core functions and either
  394.     the aux/tk library or a xmesa, amesa, etc. interface program.
  395.  
  396.  
  397.  
  398. More on the device drivers
  399. ==========================
  400.  
  401. See the file src/dd.h for the list of functions which compose a device
  402. driver.  Each of the functions must be implemented on your system/hardware
  403. for the library to function.  Additionally, you must provide some
  404. functions for establishing rendering contexts, swapping buffers, etc.
  405. in a manner similar to the GLX library.
  406.  
  407. There are basically three catagories of functions in the device driver:
  408.  
  409.     1. simple primitive functions
  410.     2. span-based functions
  411.     3. miscellaneous functions
  412.  
  413. Simple primitive functions are used to write individual pixels, line
  414. segments, or polygons to the output device.  These functions are used
  415. when advanced features such as depth-buffering, stenciling, and smooth
  416. shading are disabled.  If your system supports line or polygons rendering
  417. in hardware or in the OS, you should use those facilities.
  418.  
  419. Span-based functions are used to render primitives which require depth-
  420. buffering, smooth shading, etc.  The span functions write a horizontal
  421. sequence of pixels to the frame buffer with a per-pixel binary mask.
  422. Pixels may be masked from writing when they fail the depth test, stencil
  423. test, stippling, etc.
  424.  
  425. Among the miscellaneous functions are functions for clearing the output
  426. buffer, specifying the reading and drawing buffers
  427.  
  428.  
  429.  
  430. The X/Mesa device driver
  431. ------------------------
  432.  
  433. The X/Mesa driver is the interface between GL and the X11 window system.
  434. All GL rendering is performed by making X11 library calls.  This isn't
  435. the fastest method, but it's the most portable and 'networkable'.  The X/Mesa
  436. interface was loosely modeled on the GLX interface.  See the file
  437. include/GL/xmesa.h for the programmer's view.  The file src/xmesa.c
  438. is the implementation of the xmesa and device driver functions.
  439.  
  440. Of interest is the implementation of the back buffer used when double
  441. buffering is enabled.  The last argument to XMesaCreateContext() is
  442. a flag which specifies whether an off-screen pixmap (on the server) or
  443. an Ximage (on the host) is used as the back buffer.  It's probably best
  444. to use a pixmap when your rendering low-complexity scenes and to use an
  445. Ximage when rendering high-complexity scenes or displaying remotely.  Try
  446. both to determine which is faster for your application.
  447.  
  448. There is support for the X Shared Memory extension.  To enable it, add the
  449. flag -DSHM to the src/Makefile CFLAGS line and be sure to link your applica-
  450. tion with -lXext.  When enabled, the Shared Memory extension will be utilized
  451. when using an XImage for the back buffer in double buffer mode.  The net
  452. result is the "swap" operation will be faster (especially for larger windows).
  453.  
  454. Also, note that alpha blending usually only works when rendering into
  455. an Ximage.  This is because the X server usually discards extra bits in
  456. the argument passed to XSetForeground while XPutPixel will not discard
  457. the extra alpha bits.
  458.  
  459. While a 24-bit (or 12-bit) TrueColor or DirectColor visual is recommended
  460. for rendering in RGB mode, 8-bit (or 1-bit!) PseudoColor or StaticColor
  461. visuals are supported.  When simulating RGB mode on an 8-bit or 1-bit
  462. display, dithering is used to increase the number of perceived colors.
  463. Thanks to Bob Mercier for the wonderful new 8-bit dithering code.
  464.  
  465.  
  466. GLX
  467. ---
  468.  
  469. Real OpenGL uses the GLX X extension to tie into the X window system.
  470. Mesa's GLX is _not_ an implementation of the real GLX protocol.  It only
  471. tries to act like it.  If you're going to use the GLX functions you
  472. should scan src/glx.c to see its deficiencies.
  473.  
  474.  
  475.  
  476. Porting to new systems
  477. ======================
  478.  
  479. Porting Mesa to new systems should require very few changes to the core
  480. code in src/.  The most effort will be in implementing the device driver
  481. functions described in "dd.h".  Those functions, plus more system-specific
  482. functions such as those in xmesa.c and amesa.c are the interface between the
  483. Mesa library and the OS/hardware.
  484.  
  485. Ideas for porting to MS Windows:
  486.     1. Call the interface "wmesa" (Windows/Mesa interface)
  487.     2. Design a "wmesa.h" file which describes how users must setup/
  488.        destory a Windows/Mesa context, etc.
  489.     3. Implement the functions in "dd.h" and "wmesa.h" in terms of
  490.        MS Windows functions in "wmesa.c"
  491.     4. Create a makefile which compiles all the core files and wmesa.c
  492.        and makes a library in lib/.
  493.     5. Update the top-level Makefile.
  494.     6. Implement the tk libarary in terms of the core and wmesa.c
  495.        functions.
  496.  
  497. <One may also want to write a VGA driver and bypass windows for better
  498. performance...>
  499.  
  500. Ideas for porting to Apple MacIntosh:
  501.     1. Call the interface "mmesa" (Mac/Mesa interface)
  502.     2. Design a "mmesa.h" file which describes how users must setup/
  503.        destroy a Mac/Mesa context, etc.
  504.     3. Implement the functions in "dd.h" and "mmesa.h" in terms of
  505.        Mac OS/QuickDraw functions in "mmesa.c"
  506.     4. Create a makefile which compiles all the Mesa core files and
  507.        mmesa.c and makes a library in lib/.
  508.     5. Update the top-level Makefile.
  509.     6. Implement the tk libarary in terms of the core and mmesa.c
  510.        functions.
  511.  
  512. Ideas for porting to more Unix/X workstations.
  513.     1. Edit the Make-config to add appropriate entries for your system.
  514.     2. If your compiler detects errors or warnings, try to correct them
  515.        in a portable fashion.
  516.  
  517. Also:
  518.     1. You may want to adjust some of the parameters in config.h
  519.     2. If the GL datatypes in GL/gl.h need to be defined in terms
  520.        of some C types other than what's currently seen, you may
  521.        have to insert some #ifdef <arch> directives.
  522.  
  523.  
  524.  
  525. Mesa programming notes
  526. ----------------------
  527.  
  528. Per-vertex fog is used by default when possible, use glHint( GL_FOG_HINT,
  529. GL_NICEST ) to enable per-pixel fog.
  530.  
  531. Linear texture coordinate interpolation is used by default.  To enable
  532. perspective-corrected interpolation use glHint( GL_PERSPECTIVE_CORRECTION_HINT,
  533. GL_NICEST ).
  534.  
  535.  
  536.  
  537.  
  538. Coordinate transformation order:
  539. --------------------------------
  540. glVertex()
  541.     object coords
  542. xform by ModelView matrix
  543.     eye coords
  544. clip to user clip planes
  545.     eye coords
  546. xform by Projection matrix
  547.     clip coords
  548. clip to view volume
  549.     clip coords
  550. divide by W
  551.     ndc coords
  552. map to window by viewport
  553.     window coords
  554.  
  555.  
  556.  
  557. Checklist of library status
  558. ---------------------------
  559.  
  560. function            status & notes
  561. ------------            --------------------------------
  562. glAccum                Done
  563. glAlphaFunc            Done
  564. glBegin                Done
  565. glBitmap            Done, but not thoroughly tested
  566. glBlendFunc            Done
  567. glCallList            Done
  568. glCallLists            Done
  569. glClear                done    (except for scissor box)
  570. glClearAccum            Done
  571. glClearColor            Done
  572. glClearDepth            Done
  573. glClearIndex            done?
  574. glClearStencil            done?
  575. glClipPlane            done?
  576. glColor*            Done
  577. glColorMask            done, but no effect in drivers
  578. glColorMaterial            done?
  579. glCopyPixels
  580. glCullFace            Done
  581. glDeleteLists            Done
  582. glDepthFunc            Done
  583. glDepthMask            Done
  584. glDepthRange            Done
  585. glDisable            Done
  586. glDrawBuffer            Done, but behavior depends on the Mesa driver
  587. glDrawPixels            Done, but not thoroughly tested
  588. glEdgeFlag            Done
  589. glEdgeFlagv            Done
  590. glEnable            Done
  591. glEnd                Done
  592. glEndList            Done
  593. glEvalCoord1*            done
  594. glEvalCoord2*            done
  595. glEvalMesh1            done
  596. glEvalMesh2            done
  597. glEvalPoint1            done
  598. glEvalPoint2            done
  599. glFeedbackBuffer        done?
  600. glFinish            done
  601. glFlush                done
  602. glFog*                done
  603. glFrontFace            done
  604. glFrustum            done
  605. glGenLists            done
  606. glGetBooleanv            mostly done
  607. glGetClipPlane            done
  608. glGetDoublev            mostly done
  609. glGetError            done
  610. glGetFloatv            mostly done
  611. glGetIntegerv            mostly done
  612. glGetLightfv            done
  613. glGetLightiv            
  614. glGetMapdv            done
  615. glGetMapfv            done
  616. glGetMapiv            done
  617. glGetMaterialfv
  618. glGetMaterialiv
  619. glGetPixelMapfv
  620. glGetPixelMapuiv
  621. glGetPixelMapusv
  622. glGetPolygonStipple        mostly done
  623. glGetString            done
  624. glGetTexEnvfv
  625. glGetTexEnviv
  626. glGetTexGendv
  627. glGetTexGenfv
  628. glGetTexGeniv
  629. glGetTexImage
  630. glGetTexLevelParameterfv
  631. glGetTexLevelParameteriv
  632. glGetTexParameterfv
  633. glGetTexParameteriv
  634. glHint                done, but no effect in some cases
  635. glIndexMask            done, no effect in drivers?
  636. glIndex*            done
  637. glInitNames            done?
  638. glIsEnabled            done
  639. glIsList            done
  640. glLightModel*            done
  641. glLight*            done
  642. glLineStipple            done
  643. glLineWidth            done
  644. glListBase            done
  645. glLoadIdentity            done
  646. glLoadMatrixd            done
  647. glLoadMatrixf            done
  648. glLoadName            done
  649. glLogicOp            done
  650. glMap[12]*            done
  651. glMapGrid[12]*            done
  652. glMaterial*            done
  653. glMatrixMode            done
  654. glMultMatrixd            done
  655. glMultMatrixf            done
  656. glNewList            done
  657. glNormal*            done
  658. glOrtho                done
  659. glPassThrough            done
  660. glPixelMap*            done except for display list compile
  661. glPixelStore*            done
  662. glPixelTransfer*        done
  663. glPixelZoom            not even started!
  664. glPointSize            done
  665. glPolygonMode            done
  666. glPolygonStipple        almost done
  667. glPopAttrib            done
  668. glPopMatrix            done
  669. glPopName            done
  670. glPushAttrib            done
  671. glPushMatrix            done
  672. glPushName            done
  673. glRasterPos*            done
  674. glReadBuffer            done
  675. glReadPixels            Done, but not thoroughly tested
  676. glRect*                done
  677. glRenderMode            done
  678. glRotated            done
  679. glRotatef            done
  680. glScaled            done
  681. glScalef            done
  682. glScissor            done
  683. glSelectBuffer            done
  684. glShadeModel            done
  685. glStencilFunc            done
  686. glStencilMask            done
  687. glStencilOp            done
  688. glTexCoord*            done
  689. glTexEnvf
  690. glTexEnvfv
  691. glTexEnvi
  692. glTexEnviv
  693. glTexGend
  694. glTexGendv
  695. glTexGenf
  696. glTexGenfv
  697. glTexGeni
  698. glTexGeniv
  699. glTexImage1D
  700. glTexImage2D            partially works
  701. glTexParameterf
  702. glTexParameterfv
  703. glTexParameteri
  704. glTexParameteriv
  705. glTranslated            done
  706. glTranslatef            done
  707. glVertex*            done
  708. glViewport            done
  709.  
  710.  
  711.  
  712. To Do
  713. -----
  714.  
  715. (grep for TODO in *.[ch] for details)
  716.  
  717. make sure all argument checking is delayed until display list execution time.
  718.  
  719. a few functions still don't get compiled into display lists
  720.  
  721. many GLU functions need to be written, including NURBS
  722.  
  723. glPixelZoom
  724.  
  725. many texture mapping functions
  726.  
  727. texture mapped lines, points
  728.  
  729. glGetTex* calls
  730.  
  731.  
  732.  
  733. Recent changes
  734. --------------
  735.  
  736. 11 Feb 95    Better makefile support for Suns
  737. 11 Feb 95    Changed NDC coordinate scheme (no more Vndc array)
  738. 12 Feb 95    Perspective-corrected texture coordinate interpolated added.
  739. 12 Feb 95    Per-pixel fog implemented
  740. 13 Feb 95    Added X Shared Memory support
  741. ...
  742. 23 Mar 95    Introduced vertex buffer (VB) stuff
  743. 27 Mar 95    Reimplemented xmesa.c using function pointers to the
  744.           pixel writing functions
  745.  
  746.